package com.heima.admin;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import javafx.scene.control.Pagination;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan("com.heima.admin.mapper")
@EnableDiscoveryClient//启动nacos
public class AdminApplication {
    public static void main(String[] args) {
        SpringApplication.run(AdminApplication.class, args);
    }

        //mybatis plus 本身不自动开启分页功能

        @Bean//分页拦截器,对象交给spring管理
        PaginationInterceptor paginationInterceptor(){
            return new PaginationInterceptor();
        }
    }

